Page({
  data: {
    shopName: ''
  },

  onShareAppMessage() {
    return {};
  },

  onLoad() {
    this.getShopInfo();
  },

  onShow() {
    this.getShopInfo();
  },

  // 获取店铺信息
  getShopInfo() {
    const userInfo = wx.getStorageSync('userInfo');
    if (userInfo && userInfo.shopName) {
      this.setData({
        shopName: userInfo.shopName
      });
    }
  },

  // 处理管理款式点击
  handleManageStyle() {
    wx.navigateTo({
      url: '/pages/merchant/manage-style/index'
    });
  },

  // 处理管理订单点击
  handleManageOrder() {
    wx.navigateTo({
      url: '/pages/merchant/manage-order/index'
    });
  }
});